1. Field of the Invention
The present invention relates generally to document management, and more particularly, to a method and system for optimally storing and retrieving documents having a hierarchical structure such as XML documents.
2. Description of the Related Art
Extensible Markup Language (XML) is a universally accepted format for representing structured data in textual form. The XML format embeds content within tags that express its structure. XML makes it possible for different tools, applications and repositories on a variety of platforms and middleware to meaningfully share data and to easily search for data that is embedded in the XML documents.
XML documents are typically managed using a database. When specific information from an XML document is desired, a query is issued. In response to the query, the XML document identified in the query is retrieved from the database and parsed, and the desired information is extracted from the parsed XML document. The parsed XML document is commonly known as an XML DOM (Document Object Model). When the number and size of the XML documents stored in the database is very large, the processing of the queries carried out as described above requires expensive storage and becomes computationally expensive.